#ifndef FATMAZEPATHFINDINGCA_H
#define FATMAZEPATHFINDINGCA_H
/*

#include <vector>
#include <cstdio>
#include "ca.h"
#include "rules/FatMazePathFinding.h"
#include "neighbourhoods/moore_1.h"

using namespace std;

class FatMazePathFindingCA:public CA
{


public:

    FatMazePathFindingCA():CA()
    {
    }
    ~FatMazePathFindingCA()
    {
    }

    bool next()
    {

        bool changed=false;
        for(int i=0;i<height;++i)
            for(int j=0;j<width;++j){
                new_states[0][i][j]=current_states[0][i][j];

                vector<int> nbs=neighbours<int>(current_states[0],width,height,i,j);
                for(int r=0;r<RULES_SIZE;++r)
                {
                    bool f=true;
                    if(current_states[0][i][j]!=rules[r][0])continue;
                    for(int n=0;n<NEIGHBOURS_SIZE;++n)
                    {

                        if(rules[r][n+1]!=ANY && nbs[n]!=rules[r][n+1])
                        {
                            f=false;
                            break;
                        }
                    }
                    if(f)
                    {
                        int new_state=rules[r][NEIGHBOURS_SIZE+1];
                        changed=(new_states[0][i][j]!=new_state);
                        if(changed)new_states[0][i][j]=new_state;
                        break;
                    }
                }
            }

        int* tmp;
        for(int x=0;x<height;++x)
        {
            tmp=current_states[0][x];
            current_states[0][x]=new_states[0][x];
            new_states[0][x]=tmp;
        }

        ++step;
        return changed;

    }

    void start(){
        printState2D(0);
        while(next())printState2D(0);
    }

    void start(int steps)
    {
        printState2D(0);
        for(int i=0;i<steps;++i){next();
            printState2D(0);}
    }

};


*/
#endif // FATMAZEPATHFINDINGCA_H
